<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Admin\Zan;
use App\Admin\Category;
use App\Admin\Single;
use App\Home\Users;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;
class CountController extends Controller
{
    public function count(Request $request){
            //良品购商品总数
            $lianggoods=DB::table('lianggoods')->count();
            //单品总数
            $single=DB::table('single')->count();
            //单品获赞总数
            $danzan=DB::table('zan')->where('zanstatus',1)->count();
            //单品收藏总数
            $dancollect=DB::table('collect')->where('collectstatus',1)->count();
            //前台用户总数
            $users=DB::table('users')->count();
            //回复总数
            $message=DB::table('message')->count();
            //后台用户总数
            $admin=DB::table('admin')->count();
            //标签总数
            $label=DB::table('label')->count();
            //会员消息总数
            $sends=DB::table('sends')->count();
            //专辑总数
            $specials=DB::table('sends')->count();
            //文章总数
            $articles=DB::table('articles')->count();
            //意见反馈总数
            $mess=DB::table('mess')->count();
            //友情链接总数
            $links=DB::table('links')->count();
//            dd($links);


        return view('admin/count/CountList',compact('lianggoods','single','danzan','dancollect','users','message','admin','label','sends','specials','articles','mess','links'));
    }
}
